package cn.com.nes.mybatis.agent.ope.mapper;

import cn.com.nes.mybatis.agent.ope.entity.ProductSeriesAndEnergy;
import cn.com.nes.site.entity.dto.product.ProductSeriesAndEnergyDTO;
import cn.com.nes.site.service.product.bo.QueryProductSeriesAndEnergyBO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Set;

/**
 * Created with IntelliJ IDEA.
 *
 * @Author: ShenWei
 * @Date: 2024/03/26/16:17
 */
public interface ProductSeriesAndEnergyMapper extends BaseMapper<ProductSeriesAndEnergy> {
    Integer getLevel(@Param("parentId") Long parentId);

    Integer getChildMaxSort(@Param("parentId") Long parentId);

    List<ProductSeriesAndEnergyDTO> getParentNode(@Param("nodeType") Integer nodeType,@Param("companyId") String companyId,@Param("enable") Boolean enable);

    List<ProductSeriesAndEnergyDTO> getChildListByParentId(@Param("parentId") Long parentId,@Param("enable") Boolean enable);

    List<ProductSeriesAndEnergyDTO> getSeriesList();

    void initEnergyType(@Param("id") Long id);

    List<ProductSeriesAndEnergyDTO> queryEnergyNodeList(QueryProductSeriesAndEnergyBO queryBO);

    List<ProductSeriesAndEnergyDTO> querySeriesNodeList(QueryProductSeriesAndEnergyBO queryBO);

    List<ProductSeriesAndEnergyDTO> getNodeListById(@Param("idList") Set<Long> idList);

    Integer getChildCountById(@Param("id") Long id);
}
